{extend name="public/base" /}
{block name="container"}
<body class="gray-bg">
    <div class="wrapper wrapper-content">
        <div class="row animated fadeInRight">
            <div class="col-sm-4">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>客户资料</h5>
                    </div>
                    <div>
                        <div class="ibox-content no-padding border-left-right">
                            <!-- <img alt="image" class="img-responsive" src="img/profile_big.jpg"> -->
                        </div>
                        <div class="ibox-content profile-content">
                            <h4 style="display:flex;flex-grow: row wrap;"><strong style="width: 50%;text-align: left;"><i class="fa fa-user"></i>&emsp;{$data.name}</strong><i class="fa fa-phone" style="width: 50%;text-align: left;color: #23b7e5;">&nbsp;:&nbsp;<span style="color: #0e6a86">{$data.phone}</span></i></h4>
                            <p><i class="fa fa-map-marker"></i> {$data.prov}{$data.city}{$data.area}{$data.address}</p>
                            <div>
                                <dl class="dl-horizontal">

                                    <dt style="margin-left: -92px !important;">客户级别：</dt>
                                    <dd style="margin-left: -92px !important;">{$data.level}</dd>
                                    <dt style="margin-left: -92px !important;">客户来源：</dt>
                                    <dd style="margin-left: -92px !important;">{$data.from}</dd>
                                    <dt style="margin-left: -92px !important;">客户意向：</dt>
                                    <dd style="margin-left: -92px !important;"><a href="project_detail.html#" class="text-navy">{$data.yixiang}</a>
                                    </dd>
                                    <dt style="margin-left: -92px !important;">客户行业：</dt>
                                    <dd style="margin-left: -92px !important;">{$data.hangye}</dd>
                                </dl>
                            </div>
                             <h5>
                                  备注信息
                               </h5>
                           <p>
                              {$data.content}
                           </p>
                            {if condition="$comp neq 0"}
                           <div class="row m-t-lg">
                               <div class="col-sm-4">
                                   <h5><strong>公司名称</strong> </h5>
                                   <span class="bar">{$comp.name}</span>
                               </div>
                               <div class="col-sm-4">
                                   <h5><strong>联系电话</strong> </h5>
                                   <span class="bar">{$comp.phone}</span>
                               </div>
                               <div class="col-sm-4">
                                   <h5><strong>公司地址</strong> </h5>
                                   <span class="bar">{$comp.address}</span>
                               </div>
                           </div>
                            {/if}
                            <p><br /></p>
                           <div class="user-button">
                               <div class="row">
                                   <div class="col-sm-6">
                                    <a href="#modal-form_yundan" data-toggle="modal" class="btn btn-primary btn-sm btn-block"><i class="fa fa-envelope"></i>&emsp;添加回访记录</a>
                                   </div>
                                   <div class="col-sm-6">
                                    <a href="{:url('index/customer/privateUpdate',array('id'=>$data['id']))}" class="btn btn-default btn-sm btn-block"><i class="fa fa-coffee"></i>&emsp;修改信息</a>
                                   </div>
                               </div>
                           </div> 
                        </div>
                    </div>
                </div>
            </div>
            <div class="col-sm-8">
                <div class="ibox float-e-margins">
                    <div class="ibox-title">
                        <h5>回访记录</h5>
                    </div>
                    <div class="ibox-content">
                        <div>
                            <div class="feed-activity-list">
                                <?php if(!empty($list)){?> 
                                {volist name="list" id="vo"}
                                <div class="feed-element">
                                    <div class="media-body ">
                                        <small class="pull-right text-navy">{$vo.addtime|date='Y-m-d H:i',###}</small>
                                        <strong>{$vo.entry}</strong>
                                        <br><br>
                                        <small class="text-muted" style="font-size: 12px;"><strong>客户意向：</strong>{$vo.yixiang}</small>
                                        <br><br>
                                        <small class="text-muted" style="font-size: 12px;"><strong>回访方式：</strong>{$vo.huifang}</small>
                                        <br><br>
                                        <small class="text-muted" style="font-size: 12px;"><strong>回访记录：</strong>{$vo.content}</small>
                                    </div>
                                </div>
                                {/volist}        
                              <?php }else{?>
                                <div class="feed-element">  
                                     <div class="media-body ">
                                     </div>
                                </div> 
                              <?php }?>              
                            </div>
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>


 <div id="modal-form_yundan" class="modal fade" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-body">
                <div class="row">
                    <div class="col-sm-12 b-r">
                        <h3 class="m-t-none m-b">添加维护记录：</h3>
                        <form role="form" action="{:url('index/customer/addRow')}" method="post">
                            <div class="form-group">
                                <label class="col-sm-3 control-label" style="text-align: right;">客户意向：</label>
                                    <div class="col-sm-9">
                                        <select name="yixiang" id="" class="form-control">
                                            <option value="-1">--请选择--</option>
                                            <option value="A">已成交</option>
                                            <option value="B">意向较大</option>
                                            <option value="C">有意向</option>
                                            <option value="D">死客</option>
                                        </select>
                                    </div>
                                    <label class="col-sm-3 control-label" style="text-align: right;">回访方式：</label>
                                          <div class="col-sm-9">
                                          <select name="huifang" id="" class="form-control">
                                            <option value="-1">--请选择--</option>
                                             <option value="1">去电</option>
                                             <option value="2">来电</option>
                                             <option value="3">上门</option>
                                             <option value="4">信息</option>
                                          </select>
                                          </div>
                                <label class="col-sm-3 control-label" style="margin-top: 10px;text-align: right;">维护记录：</label>
                                    <div class="col-sm-9" style="margin-top: 10px;margin-bottom: 30px;">
                                        <textarea name="content" id="" cols="30" rows="10" style="resize: none" class="form-control"></textarea>
                                        <input type="hidden" id="orderid_yun" name="cust_id" value="{$data.id}">
                                    </div>
                            </div>
                            <div>
                                <button class="btn btn-sm btn-primary pull-right m-t-n-xs" type="submit"><strong>提交</strong></button>
                            </div>
                        </form>
                    </div>
                </div>
        </div>
    </div>
 </div>
</div>


{/block}
{block name="js"}
    <!-- 自定义js -->
    <script src="js/content.js?v=1.0.0"></script>
    <!-- Peity -->
    <script src="js/plugins/peity/jquery.peity.min.js"></script>
    <!-- Peity -->
    <script src="js/demo/peity-demo.js"></script>
{/block}
